// 页面的预加载检查
let Page_Prefab = {
    'passListPage': [
        "uimod/passItemBig",
        "uimod/passItem",
    ],
    'boxPage': [
        "uimod/gaChaItem",
        { name: 'item', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'fightEnd', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'skill', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'bg_card', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'rolePage': [
        "uimod/roleitemPre",
        "uimod/roleEquipItem",
        "uimod/inFight",
        { name: 'equip', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'rolePage', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'missionPage': [
        "uimod/taskItem",
        { name: 'taskPage', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'item', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'skillPage': [
        "uimod/mergeItem",
        "uimod/skillItem",
        { name: 'fightMain', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'skillPage', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'skill', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'merge', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'BottomBar': [
        { name: 'mainPage', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'mainNew', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'RightBar': [
        { name: 'adicon', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'btns', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'bottomSec': [
        "uimod/bagItem",
        "uimod/scrollAd",
        "uimod/boxItem",
        { name: 'item', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'bagPage': [
        "uimod/bagItem",
    ],
    'trialNewRolePage': [
        { name: 'overPage', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'equipmentPage': [
        "uimod/equipPageItem",
        "uimod/inFight",
        "uimod/equipItem",
        { name: 'overPage', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'numTitle', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'equip', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'equipPage', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'rolePage', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: '1001', type: cc.AudioClip, bundle: "voice" },
        { name: '1002', type: cc.AudioClip, bundle: "voice" },
        { name: '1003', type: cc.AudioClip, bundle: "voice" },
        { name: '1004', type: cc.AudioClip, bundle: "voice" },
    ],
    // 战斗界面
    'GameOverPage': [
        { name: 'overPage', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'item', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'win', type: cc.AudioClip, bundle: "voice" },
        { name: 'fail', type: cc.AudioClip, bundle: "voice" },
        "uimod/bagItem"
    ],
    'adScroll': [
        "uimod/adIcon",
    ],
    'fakeRan': [
        "uimod/fakeRankItem",
        { name: 'fakeRank', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'mainAdPage': [
        "uimod/adIcon",
        "uimod/scrollAd",
    ],
    'signPage': [
        { name: 'signPage', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'rewardPage': [
        { name: 'item', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'fightMain', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'reward', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'storePage': [
        "uimod/storeItem",
        { name: 'item', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'skill', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'rankMainPage': [
        "uimod/passItemBig",
        "uimod/passItem",
        { name: 'newPageList', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'manhuaPage': [
        "uimod/manhuaNode",
    ],
    'tryoutPage': [
        { name: 'skill', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'getStoreItemPage': [
        { name: 'skill', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'item', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
    'randomCardPage': [
        { name: 'skill', type: cc.SpriteAtlas, bundle: 'plist' },
    ],
}
// 场景预加载
let Scene_Prefab = {
    'Playground': [
        "prefab/wayUnit",       // 
        "prefab/towerBase",     // 基础塔胚
        "prefab/buffAni",       // buff基类动画
        'page/SkillBox',        // 技能面板
        'uimod/skillButton',    // 技能按钮
        'page/TopInfo',         // 角色顶部面板
        { name: 'spine/ani/critical_strike', type: sp.SkeletonData },
        { name: 'fightMain', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'skill', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'play', type: cc.AudioClip, bundle: "voice" }
    ],
    'Main': [
        "uimod/scrollAd",
        "uimod/adIcon",
        "uimod/adIconSec",
        // "uimod/manhuaNode",
        // "page/manhuaPage",
        { name: 'manager', type: cc.SpriteAtlas, bundle: "plist" },
        { name: 'goPass', type: cc.SpriteAtlas, bundle: "plist" },
        { name: 'mainNew', type: cc.SpriteAtlas, bundle: "plist" },
        { name: 'item', type: cc.SpriteAtlas, bundle: 'plist' },
        { name: 'go_pass', type: cc.AudioClip, bundle: "voice" },
        { name: 'short', type: cc.AudioClip, bundle: "voice" },
        { name: 'bgm', type: cc.AudioClip, bundle: "voice" },
        { name: 'button', type: cc.AudioClip, bundle: "voice" },
        { name: 'page', type: cc.AudioClip, bundle: "voice" }
    ]
}
// UI 层级
let UI_Layer = cc.Enum({
    Base: 1,     // 基础
    Cover: 2,    // 遮罩
    Pop: 3,      // 界面
    Load: 4,     // 加载层
    Click: 5,    // 点击特效
    Msg: 6       // 信息层
})
// 游玩界面管理
let PlayGround_Listen = cc.Enum({
    UPDATE_HP: 1,           // 直接更新血量
    UPDATE_HP_ANI: 2,       // 更新血量动画 一般扣血就用这个
    UPDATE_AVATAR: 3,       // 角色头像更新
})
// 控制器管理
let Control_Listen = cc.Enum({
    SKILL_CD_CLEAR: 1,      // 技能CD
    CLOSE_START_GUIDE: 2,    // 关闭开始指引
    UPDATE_RED_DOT: 3,
})
//红点信息
let RedDot_Key = cc.Enum({
    DAY_SIGN: 1,   // 每日签到
    TASK: 2,         // 任务面板
    ROLE_INFO: 3,    // 角色信息
})
// ui枚举管理
let UI_Listen = cc.Enum({
    CLOSE_LOAD_COVER: 1,   // 场景加载遮罩
    /**
     *  TOP bar 状态
     */
    TOP_UPDATE_MONEY: 6001,
    TOP_UPDATE_DIAMOND: 6002,
    /**
     * 背包页面装备
     */
    BAG_CHOOSE: 1001,
    BAG_QUIT: 1002,

    /**
     * 技能装备页面状态
     */
    SKILL_NONE: 2001,
    SKILL_ONLY_TEAM: 2002,
    SKILL_ONLY_BAG: 2003,
    SKILL_BAG_TEAM: 2004,
    SKILL_TEAMCARD: 2011,
    SKILL_BAGCARD: 2012,
    SKILL_UPDATEPAGE: 2013,
    SKILL_UPDATEMERGE: 2014,
    SKILL_ADDCARD: 2015,
    /**
     * bottombar 页面状态
     */
    BOTTOM_MISSION: 3001,
    BOTTOM_TEAM: 3002,
    BOTTOM_FIGHT: 3003,
    BOTTOM_CARD: 3004,
    BOTTOM_BAG: 3005,

    /**
     * main场景状态
     */
    MAIN_CLOSEPAGE: 4001,
    MAIN_TOMAIN: 4002,
    MAIN_SHOWPASS: 4003,
    MAIN_NEWROLE: 4004,
    MAIN_GUIDEEND: 4005,
    MAIN_ENDAD: 4006,
    MAIN_NEWPAGE: 4007,
    MAIN_SHOWVIDEO: 4008,
    MAIN_CANCLOSEAD: 4009,
    /**
     * 更换装备页面阶段
     */
    EQUIP_PAGE: 5001,
    EQUIP_CHOOSE: 5002,
    EQUIP_INDEX: 5003,
    EQUIP_SHANGCHANG: 5004,
    EQUIP_CHEXIA: 5005,
    EQUIP_TIHUAN: 5006,
    EQUIP_NONE: 5007,
    EQUIP_SETEQUIP: 5008,
    EQUIP_LVUPBTN: 5009,
    EQUIP_CLCIKBTN: 5010,
    EQUIP_LOOKAD: 5011,

    EQUIPITEM_GETCLICK: 5012,
    EQUIPITEM_INFOUPDATE: 5013,
    EQUIPITEM_ITEMCLICK: 5014,

    EQUIP_DETAILUPDATE: 5015,

    /**
     * 任务页面
     */
    TASK_UPDATE: 7001,
    TASK_CLOSE: 7002,
    TASK_TIAOZHUAN: 7003,
    /**
     * 角色页面
     */
    ROLE_BIG_CHOOSE: 8001,
    ROLE_SML_CHOOSE: 8002,
    ROLE_OL_BIG: 8011,
    ROLE_OL_SMALL: 8012,
    ROLE_BOTH: 8013,
    ROLE_NONE: 8014,
    ROLE_GOFIGHT: 8015,
    ROLE_GOHOME: 8016,
    /**
     * 商店
     */
    SHOP_CLICK: 9001,
    SHOP_BUY: 9002,
    /**
     * playground
     */
    PLGD_STARTEND: 10001,
    PLGD_ENDAD: 10002,
    PLGD_VIDEO: 10003,
})
let Scene_GM_Page = {
    'Main': [
        { name: 'GM_main', layer: UI_Layer.Msg, script: 'gm_main' },
    ]
}
let SKILLKARDBG = cc.Enum({
    TEAM: 1,         // 上阵队列
    BAG: 2,          // 背包内
})
export { Page_Prefab, Scene_Prefab, UI_Layer, PlayGround_Listen, Control_Listen, UI_Listen, Scene_GM_Page, RedDot_Key, SKILLKARDBG }

